<{include file='public/head'}>
<div class="am-g">
	<div class="am-tab-panel am-fade am-in am-active" id="tab1"> 
		<!--分类筛选start--->
		  <div class="layui-colla-item">
				<div id="fundyeji" class="search-condition">
					<div class="layui-tab layui-tab-card" style="position: relative;">
					<!--一级分类循环 START--->
					<{assign name="now_pid" value="35," /}>
					  <{volist name="all_cate" id="li"}>
					  <ul class="layui-tab-title" id="ontype">
					   <{volist name="li" id="val"}>
						<li <{in name="val['TypeID']" value="$subid"}> class="layui-btn actived"<{assign name="now_pid" value="$val['TypePath']" /}><{/in}> onclick="location.href='<{:url('wholetype/whotype')}>?subid=<{$val.TypePath}>'"><{$val.TypeName}>
						</li>
						<{/volist}>
					  </ul>
					  <{/volist}>
					  <!--一级分类循环 END--->
					</div>
				</div>
				<div class="clearfloat"></div>
				<div class="am-form-group"><br/>
					<div class="am-u-sm-3">
						<input type="hidden" value="<{$subid}>" name="subjectypepath" id="subjectypepath">
						<button id="submitForm" class="am-btn am-btn-primary am-radius am-btn-block" type="button">确定</button>
					</div>
					<div class="am-u-sm-3"></div>
					<br/><br/>
				</div>
		  </div>
		<!--分类筛选END--->
</div>
  <!-- content end -->
<script type="text/javascript" src="__STATIC__/assets/js/jquery.form.js"></script>
<script src="__STATIC__/home/pc/js/layer/layer.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
	$("#submitForm").click(function () {
		var subjectypepath = $("#subjectypepath").val();
		$.ajax({
			type: "post",
			url: "/supplier.php/wholetype/whotype.html",
			data: {subjectypepath: subjectypepath},
			success: function (res) {
				if (res.code) {
					$("#subject_classify", window.parent.document).html(res.msg.typeinfo);
					$("input[name=TypePID]", window.parent.document).val(res.msg.subjectypepath);
					var index = parent.layer.getFrameIndex(window.name);
					parent.layer.close(index);
				} else {
					layer.msg(res.msg.msg);
				}
			}
		});
	});
</script>
</body>
</html>